<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Document</title>
</head>

<body>
  <script>
    let glo_obj = [
      {
        weeks: ["2", "4", "5"],
        attendDates: [],
        courseStartTime: "",
        courseEndTime: "",
        /** 中间值开始时间 */
        courseStartTime_catche: "08:00:00",
        /** 中间值结束时间 */
        courseStartTime_catcheend: "09:00:05",
      },
      {
        weeks: ["2", "4", "5"],
        attendDates: [],
        courseStartTime: "",
        courseEndTime: "",
        /** 中间值开始时间 */
        courseStartTime_catche: "08:00:00",
        /** 中间值结束时间 */
        courseStartTime_catcheend: "09:00:05",
      },
    ];

    console.log(glo_obj[1].courseStartTime_catcheend);
    let moon = [
      [80000, 90000],
      [90001, 100004],
      [100004, 100094],
    ];
    let funny = checkIfArrayIntervalOverLap(moon);
    debugger;
    function checkIfArrayIntervalOverLap(area) {
      let result = false;
      let areaLength = area.length;
      if (areaLength > 0) {
        let maxStart = [];
        let minEnd = [];
        for (var i = 0; i < areaLength; i++) {
          for (var t = 0; t < i; t++) {
            if (i !== t) {
              // 不与自身比
              maxStart = [area[i][0], area[t][0]]; // 开始课时数组
              minEnd = [area[i][1], area[t][1]]; // 结束课时数组
              if (Math.max(...maxStart) <= Math.min(...minEnd)) {
                return true;
              }
            }
          }
        }
      }
      return result;
    }
  </script>

  <script>
    var num6 = CheckArrayElementa(laoxiaozi);
    let result = checkIfArrayIntervalOverLap(val.area);

    if (num6 > 0 && result === true) {
      this.open3();
      this.ruleForm.assistantcoach = "";
      this.disableds = true;
      return;
    } else {
      this._getIdleClassroomList();
      this._simpleCoachList();
      this._getAssignedClassNum();
    }
  </script>
</body>

</html>